#pragma once


#include<iostream>
#include<list>
#include<algorithm>
using namespace std;

void test1()
{
    int n = 0, m = 0;
    
    list<int> li1;
    list<int> li2;
    cin >> n >> m;

    while (n--)
    {
        int tmp = 0;
        cin >> tmp;
        li1.push_back(tmp);
    }
    while (m--)
    {
        int tmp = 0;
        cin >> tmp;
        li2.push_back(tmp);
    }
    li1.sort();
    li2.sort();
    list<int> ret;
    auto it1 = li1.begin();
    auto it2 = li2.begin();
    while (it1 != li1.end() && it2 != li2.end())
    {
        if (*it1 > *it2)
        {
            ret.push_back(*it2);
            it2++;
        }
        else {
            ret.push_back(*it1);
            it1++;
        }
    }
    while (it1 != li1.end())
    {
        ret.push_back(*it1);
        it1++;
    }

    while (it2 != li2.end())
    {
        ret.push_back(*it2);
        it2++;
    }

    for (auto au : ret)
    {
        cout << au << " ";
    }
}